package edu.ustb.efws.base.domain;

import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;

import java.util.Date;
import java.util.Objects;

/**
 * 电信发送日志
 *
 * @author TS Group
 */
public class Sms {
    @ApiModelProperty("编号")
    private Long id;
    @ApiModelProperty("订单编号")
    private String ordId;
    @ApiModelProperty("手机号")
    private String mobile;
    @ApiModelProperty("点位区域")
    private String area;
    @ApiModelProperty("点位位置")
    private String position;
    @ApiModelProperty("风险等级")
    private String grade;
    @ApiModelProperty("返回码")
    private String code;
    @ApiModelProperty("错误信息")
    private String errMsg;
    @ApiModelProperty("是否发送成功")
    private Boolean success;
    @ApiModelProperty("创建时间")
    private Date createTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getOrdId() {
        return ordId;
    }

    public void setOrdId(String ordId) {
        this.ordId = ordId;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getArea() {
        return area;
    }

    public void setArea(String area) {
        this.area = area;
    }

    public String getPosition() {
        return position;
    }

    public void setPosition(String position) {
        this.position = position;
    }

    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }

    public Boolean getSuccess() {
        return success;
    }

    public void setSuccess(Boolean success) {
        this.success = success;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Sms sms = (Sms) o;
        return Objects.equals(id, sms.id) &&
                Objects.equals(ordId, sms.ordId) &&
                Objects.equals(mobile, sms.mobile) &&
                Objects.equals(area, sms.area) &&
                Objects.equals(position, sms.position) &&
                Objects.equals(grade, sms.grade) &&
                Objects.equals(code, sms.code) &&
                Objects.equals(errMsg, sms.errMsg) &&
                Objects.equals(success, sms.success) &&
                Objects.equals(createTime, sms.createTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, ordId, mobile, area, position, grade, code, errMsg, success, createTime);
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("id", id)
                .append("ordId", ordId)
                .append("mobile", mobile)
                .append("area", area)
                .append("position", position)
                .append("grade", grade)
                .append("code", code)
                .append("errMsg", errMsg)
                .append("success", success)
                .append("createTime", createTime)
                .toString();
    }
}
